Optimal. Leaf size=260 \[ -\frac {e e^{\frac {a}{b n}} r \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (2+p,\frac {a}{b n}+\frac {\log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{x}+\frac {e e^{\frac {a}{b n}} r \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a}{b n}+\frac {\log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^{1+p} \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{b n x}-\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 260, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {2347, 2212,
2413, 12, 15, 19, 6692} \begin {gather*} -\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \left (d+e \log \left (f x^r\right )\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text {Gamma}\left (p+1,\frac {a+b \log \left (c x^n\right )}{b n}\right )}{x}-\frac {e r e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text {Gamma}\left (p+2,\frac {a}{b n}+\frac {\log \left (c x^n\right )}{n}\right )}{x}+\frac {e r e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \left (a+b \log \left (c x^n\right )\right )^{p+1} \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \text {Gamma}\left (p+1,\frac {a}{b n}+\frac {\log \left (c x^n\right )}{n}\right )}{b n x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 15
Rule 19
Rule 2212
Rule 2347
Rule 2413
Rule 6692
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^p \left (d+e \log \left (f x^r\right )\right )}{x^2} \, dx &=-\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )}{x}+(e r) \int \frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{x^2} \, dx\\ &=-\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )}{x}+\left (e e^{\frac {a}{b n}} r\right ) \int \frac {\left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{x^2} \, dx\\ &=-\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )}{x}+\frac {\left (e e^{\frac {a}{b n}} r \left (c x^n\right )^{\frac {1}{n}}\right ) \int \frac {\Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{x} \, dx}{x}\\ &=-\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )}{x}+\frac {\left (e e^{\frac {a}{b n}} r \left (c x^n\right )^{\frac {1}{n}} \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}\right ) \int \frac {\Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right )}{x} \, dx}{x}\\ &=-\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )}{x}+\frac {\left (e e^{\frac {a}{b n}} r \left (c x^n\right )^{\frac {1}{n}} \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}\right ) \text {Subst}\left (\int \Gamma \left (1+p,\frac {a+b x}{b n}\right ) \, dx,x,\log \left (c x^n\right )\right )}{n x}\\ &=-\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )}{x}+\frac {\left (e e^{\frac {a}{b n}} r \left (c x^n\right )^{\frac {1}{n}} \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}\right ) \text {Subst}\left (\int \Gamma (1+p,x) \, dx,x,\frac {a}{b n}+\frac {\log \left (c x^n\right )}{n}\right )}{x}\\ &=-\frac {e e^{\frac {a}{b n}} r \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (2+p,\frac {a}{b n}+\frac {\log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p}}{x}+\frac {e e^{\frac {a}{b n}} r \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a}{b n}+\frac {\log \left (c x^n\right )}{n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (\frac {a}{b n}+\frac {\log \left (c x^n\right )}{n}\right )}{x}-\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (a+b \log \left (c x^n\right )\right )^p \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{-p} \left (d+e \log \left (f x^r\right )\right )}{x}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.24, size = 141, normalized size = 0.54 \begin {gather*} -\frac {e^{\frac {a}{b n}} \left (c x^n\right )^{\frac {1}{n}} \left (a+b \log \left (c x^n\right )\right )^{-1+p} \left (\frac {a+b \log \left (c x^n\right )}{b n}\right )^{1-p} \left (b e n r \Gamma \left (2+p,\frac {a+b \log \left (c x^n\right )}{b n}\right )+\Gamma \left (1+p,\frac {a+b \log \left (c x^n\right )}{b n}\right ) \left (b d n-a e r-b e r \log \left (c x^n\right )+b e n \log \left (f x^r\right )\right )\right )}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.03, size = 0, normalized size = 0.00 \[\int \frac {\left (a +b \ln \left (c \,x^{n}\right )\right )^{p} \left (d +e \ln \left (f \,x^{r}\right )\right )}{x^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{p} \left (d + e \log {\left (f x^{r} \right )}\right )}{x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\left (d+e\,\ln \left (f\,x^r\right )\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^p}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________